//
//  MailViewController.m
//  NewClothesForEveryDay
//
//  Created by dllo on 15/7/13.
//  Copyright (c) 2015年 蓝天. All rights reserved.
//

#import "MailViewController.h"
#import "BaseHeader.h"
#import "MJTabBar.h"
#import "UIImageView+WebCache.h"
#import "CPKenburnsView.h"


@interface MailViewController ()

@end

@implementation MailViewController
{
    CPKenburnsView *kenbunrsView;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    
    kenbunrsView = [[CPKenburnsView alloc] initWithFrame:self.view.bounds];
    kenbunrsView.image = [UIImage imageNamed:@"lovelovelove.jpg"];
    [self.view addSubview:kenbunrsView];
    
    
    
    UIButton *button1 = [UIButton buttonWithType:UIButtonTypeSystem];
    button1.frame = CGRectMake(130, 250, 100, 100);
    [button1 addTarget:self action:@selector(magebo:) forControlEvents:UIControlEventTouchUpInside];
    button1.backgroundColor = [UIColor redColor];
    button1.tag = 1501;
    button1.layer.cornerRadius = 50;
    
    
    UIButton *button2 = [UIButton buttonWithType:UIButtonTypeSystem];
    button2.frame = CGRectMake(60, 360, 100, 100);
    [button2 addTarget:self action:@selector(magebo:) forControlEvents:UIControlEventTouchUpInside];
    button2.backgroundColor = [UIColor cyanColor];
    button2.tag = 1502;
    button2.layer.cornerRadius = 50;
    
    UIButton *button3 = [UIButton buttonWithType:UIButtonTypeSystem];
    button3.frame = CGRectMake(200, 360, 100, 100);
    [button3 addTarget:self action:@selector(magebo:) forControlEvents:UIControlEventTouchUpInside];
    button3.backgroundColor = [UIColor blueColor];
    button3.tag = 1503;
    button3.layer.cornerRadius = 50;
    
    [self.view addSubview:button1];
        [self.view addSubview:button2];
        [self.view addSubview:button3];
    
    
    
    
}

- (void)magebo:(UIButton *)button
{
    self.tabBarController.selectedIndex = button.tag - 1500;
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
